package com.huangsm.book.designmodel;

/**
 * @author huang
 * @PACKAGE_NAME com.huangsm.book.designmodel
 * @PROJECT_NAME concurrence
 * @date 2019/2/15
 */
public class Singleton {

    private Singleton(){
        //创建单例的过程可能会比较慢
        System.out.println("Singleton is create");
    }
    private static Singleton  instance=new Singleton();
    public static Singleton getInstance(){
        return instance;
    }
}
